using AndyPike.Commons.TestSupport;
using AndyPike.Snowflake.Core.Services;
using AndyPike.Snowflake.Web.Controllers;
using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;
using Rhino.Mocks;

namespace AndyPike.Snowflake.Web.Tests.Unit.Controllers
{
    [TestFixture]
    public class When_showing_a_members_dashboard : ControllerUnitTestBase
    {
        private MockRepository mockery;
        private MyController controller;
        private IAccountService accountService;

        [SetUp]
        public void SetUp()
        {
            mockery = new MockRepository();
            accountService = mockery.DynamicMock<IAccountService>();

            controller = new MyController(accountService);
            PrepareController(controller, "My");
        }

        [Test]
        public void Should_render_the_account_index_view_for_the_currently_logged_in_user()
        {
            controller.Dashboard();

            Assert.That(controller.SelectedViewName, Is.EqualTo(@"My\Dashboard"));
        }
    }

    [TestFixture]
    public class When_showing_a_members_tips : ControllerUnitTestBase
    {
        private MockRepository mockery;
        private MyController controller;
        private IAccountService accountService;

        [SetUp]
        public void SetUp()
        {
            mockery = new MockRepository();
            accountService = mockery.DynamicMock<IAccountService>();

            controller = new MyController(accountService);
            PrepareController(controller, "My");
        }

        /*[Test]
        public void Should_render_the_tips_index()
        {
            controller.Tips();

            Assert.That(controller.SelectedViewName, Is.EqualTo(@"My\Tips"));
        }*/
    }
}